﻿Imports extremo
Imports System.Data
Imports System.Data.SqlClient
Imports System.Configuration

Public Class Login
    Inherits System.Web.UI.Page

    Protected Sub btnIngresar_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnIngresar.Click

        Try
            Dim negocio As New UsuarioNegocio
            Dim modelo = negocio.logear(Me.txtUsuario.Text, Me.txtClave.Text)
            Dim url = "~/Home.aspx"

            Session.Add("USUARIO_ACTUAL", modelo)

            Response.Redirect(url, False)
        Catch ex As Exception
            Response.Write(ex.Message)
        End Try

    End Sub
End Class


